import Vue from "vue";
import App from "./App";
import "./uni.promisify.adaptor";
// 导入 request.js 模块
import http from "@/utils/request";
// 导入 message.js 模块
import { showMessage } from "@/utils/message";
// 1. 导入 vuex store 模块
import store from "@/store";

Vue.config.productionTip = false;
// 挂载到 Vue.prototype
Vue.prototype.$http = http;
// 挂载到 Vue.prototype
Vue.prototype.$format = (number) => Number(number).toFixed(2);
Vue.prototype.$msg = showMessage;

App.mpType = "app";

const app = new Vue({
  // 2. 将 store 模块关联到 Vue 实例上
  store,
  ...App,
});
app.$mount();
